package com.example.testproj.design.composite;

import android.util.Log;

/**
 * @des:
 * @author: 芮勤
 * @date: 2019/6/17 16:03
 * @see {@link }
 */
public class Leaf extends Component {
    public Leaf(String name) {
        super(name);
    }

    @Override
    public void Add(Component c) {
        Log.d(TAG, "Add:不能添加 ");
    }

    @Override
    public void Remove(Component c) {
        Log.d(TAG, "Remove: 不能移除");
    }

    @Override
    public void Display(int depth) {
        String split="";
        for (int i=0;i<depth;i++){
            split+="-";
        }
        Log.d(TAG, "Display: "+split+name);
    }
}
